package com.itlong.cloud.enumerate;

/**
 * <desc>
 *      平板推送指令类型枚举
 * </desc>
 *
 * @createDate2020/12/9
 **/
public enum  PadOperateTypeEnum {
    USER_INFO_MODIFY("0", "冻结、解冻，用户信息变更"),
    FACE_REGISTER("1", "人脸注册，用户权限变更"),
    FLOOR_MODIFY("2", "楼层映射表变更"),
    VISITOR_FACE_REGISTER("3", "访客人脸注册及删除"),

    ;
    private String operateType;
    private String description;


    /**
     * <desc>
     *      构造方法
     * </desc>
     *
     * @return
     * @Author Zhu.yj
     * @createDate  2020/12/9
     */
    PadOperateTypeEnum(String operateType, String description){
        this.operateType = operateType;
        this.description = description;
    }

    /**
     * <desc>
     *      根据指令类型获取枚举类型
     * </desc>
     *
     * @param operateType 指令类型
     * @return
     * @Author Zhu.yj
     * @createDate  2020/12/9
     */
    public static PadOperateTypeEnum getByType(String operateType){
        if (operateType == null){
            return null;
        }
        for (PadOperateTypeEnum padOperateTypeEnum : values()){
            if (padOperateTypeEnum.operateType.equals(operateType)){
                return padOperateTypeEnum;
            }
        }
        return null;
    }
}
